//
//  SLChatImageCell.h
//  MyChatDemo
//
//  Created by DragonYao on 2017/9/22.
//  Copyright © 2017年 DragonYao. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol SLChatImageCellDelegate <NSObject>

/**
 *  @param cell 将cell传过去
 *  @param row 将cell的row 传过去
 *  @param image 下载完成的图片信息
 *  @param isError 判断加载图片是否出现了错误
 */
@required
- (void)cellImgDidDownloadFinished:(UITableViewCell *)cell
                             atRow:(NSInteger)row
                             image:(UIImage *)image
                           isError:(BOOL)isError;

@end

@interface SLChatImageCell : UITableViewCell

@property (nonatomic, weak) id<SLChatImageCellDelegate> delegate;

@property (nonatomic, assign) NSUInteger indexRow;

- (void)configCellWithImgPath:(NSString *)imgPath
                    isFriends:(BOOL)isFriends;

+ (CGFloat)cellHeightWithImageRatio:(CGFloat)ratio;

@end
